package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"merchantmanager/api/internal/config"
	"merchantmanager/merchantrpc/merchantrpcclient"
)

type ServiceContext struct {
	Config      config.Config
	Merchantrpc merchantrpcclient.Merchantrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		Merchantrpc: merchantrpcclient.NewMerchantrpc(zrpc.MustNewClient(c.Merchantrpc)),
	}
}
